/**
 * Created by Administrator on 2019/6/5.
 */
var t = document.querySelector("#toTop");
window.onscroll = function () {
    console.log(document.body.scrollTop > 1000);

    if (document.body.scrollTop > 1000 || document.documentElement.scrollTop > 1000){
        t.style.display = 'block';
    }else {
        t.style.display = 'none';
    }
}
t.addEventListener('click',function() {
    window.scrollTo({
        top:0,
        behavior:'smooth'
    })
})

var fen = document.querySelector("#fen");
var fen_a = document.querySelector("#fen_a");

fen.addEventListener("mouseover",function () {
    console.log(123);
    fen_a.style.display = "block";
})

fen_a.addEventListener("mouseleave",function () {
    console.log(456);
    fen_a.style.display = "none";
})

//轮播
var swiper = new Swiper('.swiper-container', {
    slidesPerView: 1,
    spaceBetween: 30,
    loop: true,
    pagination: {
        el: '.swiper-pagination',
        clickable: true,
    },
    navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev',
    },
});